import request from '@/router/axios';
import {
    baseUrl,
    mockUrl,
} from '@/config/env';

export const DIC = {
    RATE: 2,
    SUBMIT: 1,
    STEPLIST: [{
            title: '已提交',
        },
        {
            title: '已上报',
        },
        {
            title: '已受理',
        },
        {
            title: '已评价',
        },
    ],
};
export const addObj = form => request({
    url: `${baseUrl}/app/suggestRecord/addSuggest`,
    method: 'post',
    data: form,
});


export const rateObj = form => request({
    url: `${baseUrl}/app/suggestRecord/addEstimate`,
    method: 'post',
    data: form,
});

export const submitObj = form => request({
    url: `${baseUrl}/app/suggestRecord/approve`,
    method: 'post',
    data: form,
});

export const getObj = id => request({
    url: `${baseUrl}/app/suggestRecord/suggest/${id}`,
    method: 'get',
});

export const delObj = id => request({
    url: `${baseUrl}/app/suggestRecord/${id}`,
    method: 'delete',
});
export const getList = query => request({
    url: `${baseUrl}/app/suggestRecord/page`,
    method: 'get',
    params: query,
});